import { Button, Space } from 'antd';
import { NumText } from '@/pages/OrderModule/common/components/CommonText/components/NumText';
import Typography from '@/pages/OrderModule/common/components/Typography';

const strategyType = {
	1: '按商品数量拆分',
	2: '按退款状态拆分',
	3: '按供应商/供应商拆单',
	4: '按仓库拆单',
	5: '指定商品拆单',
	6: '按重量拆单',
}

export function StrategyColumns() {
  const strategyColumns = [
    {
      title: '策略名称',
      dataIndex: 'name',
			render: t => {
				return t;
			}
    },
		{
      title: '策略类型',
      dataIndex: 'type',
			render: t => {
				return strategyType[t];
			}
    },
    {
      title: '优先级',
      dataIndex: 'level',
			render: t => {
				return t;
			}
    },
    {
      title: '编辑策略',
      dataIndex: 'field1',
      width: 200,
      render(value, record) {
        return (
          <>
            <Space>
              <Button type="link">查看编辑</Button>
              <Button danger type="link">
                删除
              </Button>
            </Space>
          </>
        );
      },
    },
    {
      title: '执行策略',
      dataIndex: 'field1',
      render(value, record) {
        return (
          <>
            <Space>
              <Button type="link">执行策略</Button>
            </Space>
          </>
        );
      },
    },
  ];
  return { strategyColumns };
}
